package bean;

/**
 * LogDestId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class LogDestId implements java.io.Serializable {

	// Fields

	private Travelogue travelogue;
	private Destination destination;

	// Constructors

	/** default constructor */
	public LogDestId() {
	}

	/** full constructor */
	public LogDestId(Travelogue travelogue, Destination destination) {
		this.travelogue = travelogue;
		this.destination = destination;
	}

	// Property accessors

	public Travelogue getTravelogue() {
		return this.travelogue;
	}

	public void setTravelogue(Travelogue travelogue) {
		this.travelogue = travelogue;
	}

	public Destination getDestination() {
		return this.destination;
	}

	public void setDestination(Destination destination) {
		this.destination = destination;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LogDestId))
			return false;
		LogDestId castOther = (LogDestId) other;

		return ((this.getTravelogue() == castOther.getTravelogue()) || (this
				.getTravelogue() != null
				&& castOther.getTravelogue() != null && this.getTravelogue()
				.equals(castOther.getTravelogue())))
				&& ((this.getDestination() == castOther.getDestination()) || (this
						.getDestination() != null
						&& castOther.getDestination() != null && this
						.getDestination().equals(castOther.getDestination())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getTravelogue() == null ? 0 : this.getTravelogue()
						.hashCode());
		result = 37
				* result
				+ (getDestination() == null ? 0 : this.getDestination()
						.hashCode());
		return result;
	}

}